﻿using IBaseService;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Model.System;

namespace kuangjia1.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class MenuController : ControllerBase
    {
        private readonly IBaseService<MenuModel, MenuModel> _baseService;

        public MenuController(IBaseService<MenuModel, MenuModel> baseService)
        {
            _baseService = baseService;
        }

        [HttpGet]
        public async Task<List<MenuModel>> GetAllMenu() { 
            return await _baseService.GetAllAsync();
        }
    }
}
